package cn.youth996.springcloud.controller;

import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

import javax.annotation.Resource;

/**
 * @author Zhan Xinjian
 * @date 2021/3/6
 */
@Slf4j
@RestController
public class OrderController {
    @Resource
    private RestTemplate restTemplate;
    public static final String REMOTE_URL = "http://ZOOKEEPER-PROVIDER-PAYMENT";
    @GetMapping("/eukeka/order/get")
    public String get() {
        return restTemplate.getForObject(REMOTE_URL + "/zookeeper/payment/get", String.class);
    }
}
